struct Edge;

struct Node
{
    Edge* FindEdgeTo(const Node* n0) const
    {
        for (UINT edgeIndex = 0; edgeIndex < edges.Length(); edgeIndex++)
        {
            Edge* curEdge = edges[edgeIndex];
            if (curEdge->ContainsNode(n0)) return curEdge;
        }

        return NULL;
    }
    void GetNeighbors(Vector<Node*> &neighbors) const
    {
        for (UINT edgeIndex = 0; edgeIndex < edges.Length(); edgeIndex++)
        {
            Node* n = edges[edgeIndex]->GetOtherNode(this);
            neighbors.PushEnd(n);
        }
    }
    
    RGBColor color;

    //
    // Recomputed at finalize
    //
    UINT index;
    Vector<Edge*> edges;
};